﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>


<%
dim Action,txt
dim id,nid,rs,sql
dim listid,pageid,reid

		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)
		reid=Request.QueryString("reid")
		if not isnumeric(reid) then reid=0
		if reid="" then reid=0
		reid=clng(reid)
		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)

		Action=Request.QueryString("Action")




if sid="Null" then
%>
<!--#include file="abcdg.asp"-->
<%=title1%><%=we%>
	请先登陆再做操作。<br/>
	<a href="/login.asp?sid=<%=sidd%>&amp;url=/bbs/viewv.asp?listid=<%=listid%>@@id=<%=id%>@@pageid=<%=pageid%>">马上登陆</a><%=we0%>
<%
else


Footmark="帖子操作"

	if Action="delrep" then
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select nid from qingtian_bbs_reforum where [id]="&reid&""
		Rs.Open Sql,conn,1,1
		if not (rs.bof and rs.eof) then
			nid=rs("nid")
		else
			nid=0
		end if
		Rs.close
		set rs=nothing
	elseif  Action="del" or Action="dinrep" or Action="qudrep" then
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select nid from qingtian_bbs_forum where [id]="&id&""
		Rs.Open Sql,conn,1,1
		if not (rs.bof and rs.eof) then
			nid=rs("nid")
		else
			nid=0
		end if
		Rs.close
		set rs=nothing
	end if



	if qingtian.qx("nodel", listid)=true and Action="del"  then
%>
<!--#include file="abcdg.asp"-->
<%=title1%><%=we%>
	出错啦!你已被禁止在本论坛删除帖子,有任何问题请联系管理员!<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
	<%
	elseif qingtian.bz(listid) or (Action="delrep" and cint(nid)=cint(qingtian.nid)) or (Action="del" and cint(nid)=cint(qingtian.nid)) or (Action="dinrep" and cint(nid)=cint(qingtian.nid)) or (Action="qudrep" and cint(nid)=cint(qingtian.nid)) then

	select case Action
	case "zuan"
		zuan
	case "jh"
		jh
	case "jt"
		jt
	case "jc"
		jc
	case "move"
		move
	case "cc"
		cc
	case "tc"
		tc
	case "del"
		del
	case "delrep"
		delrep
	case "xjh"
		xjh
	case "xjt"
		xjt
	case "xjc"
		xjc
	case "zh"
		zh
	case "hf"
		hf
	case "qudrep"
		qudrep
	case "dinrep"
		dinrep
	case "vip"
		vip
	case "xvip"
		xvip
	end select


	else
%>
<!--#include file="abcdg.asp"-->
<%=title2%><%=we%>
		你无权<%=txt%>该帖子<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>

	<%end if
end if

End Function

sub jh ''加精
dim listid,pageid,jin,jinn
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)
		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)


		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [good],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("good")=1
		rs.update
		end if
		Rs.close
                jinn=qingtian.inlof("jinn")
                jin=qingtian.inlof("jin")
		Sql = "select [zf],[money] FROM qingtian_user where [name]='"&qingtian.name(nid)&"'"
		Rs.Open Sql,conn,1,3
		if not (rs.eof and rs.bof) then
			rs("zf")=rs("zf")+jinn
			rs("money")=rs("money")+jin
			rs.update
		else
			nid=0
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"加精,你的积分增加"&zi&""&jinn&""&zi0&","&qingtian.bi&"增加"&zi&""&jin&""&zi0&"！希望你再接再厉发更多好帖,精贴！"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title3%><%=we%>
		帖子加精成功<br/>楼主的积分增加<%=zi%><%=jinn%><%=zi0%>,<%=qingtian.bi%>增加<%=zi%><%=jin%><%=zi0%>,今日系统剩余<%=qingtian.bi%>:<%=zi%><%=qingtian.inlof("mot")%><%=zi0%>。<%=we0%><%=sou%>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub

sub dinrep ''置顶


dim id,nid
dim listid,pageid,reid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)
		reid=Request.QueryString("reid")
		if not isnumeric(reid) then reid=0
		if reid="" then reid=0
		reid=clng(reid)
		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [nid],[top] FROM [qingtian_bbs_reforum]  where ID="&reid&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
		rs("top")=1
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你的回复被"&session("username")&"置顶(url=/bbs/viewv.asp?id="&id&"&listid="&listid&"&pageid="&pageid&"&sid=[sid])查看(/url)"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title4%><%=we%>
		帖子回复置顶成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub
sub qudrep ''取顶
dim id,nid
dim listid,pageid,reid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)
		reid=Request.QueryString("reid")
		if not isnumeric(reid) then reid=0
		if reid="" then reid=0
		reid=clng(reid)
		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [nid],[top] FROM [qingtian_bbs_reforum]  where ID="&reid&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
		rs("top")=0
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你的回复被"&session("username")&"取顶(url=/bbs/viewv.asp?id="&id&"&listid="&listid&"&pageid="&pageid&"&sid=[sid])查看(/url)"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title4%><%=we%>
		帖子回复取顶成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub
sub jt ''置顶


dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [top],[bottom],[nid],[name],[member] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
                if Request.QueryString("act")=1 then rs("member")=1
		rs("top")=1
		rs("bottom")=0
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"置顶"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title4%><%=we%>
		帖子置顶成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub


sub xjt ''取顶

dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [top],[nid],[name],[member] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("member")=false
		rs("top")=0
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"取消置顶"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title5%><%=we%>
		帖子取顶成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub

sub xjh ''去精

dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [good],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("good")=0
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"取消精华"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title6%><%=we%>
		帖子去精成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub

sub vip ''加VIP

dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [vip],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("vip")=1
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"设置为VIP阅读"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title14%><%=we%>
		帖子加vip成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub
sub xvip ''取消VIP

dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [vip],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("vip")=0
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"取消了VIP阅读"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title14%><%=we%>
		帖子取消vip成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub
sub jc ''锁定
dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [lock],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("lock")=1
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"锁定"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title7%><%=we%>
		帖子锁定成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub



sub xjc ''解锁
dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)


		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [lock],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("lock")=0
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"解锁"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title8%><%=we%>
		帖子解锁成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%


end sub

sub cc ''置底


dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [top],[bottom],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("top")=0
		rs("bottom")=1
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"置底"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title9%><%=we%>
		帖子置底成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub

sub zh ''取底

dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [bottom],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("bottom")=0
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"取消置底"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title10%><%=we%>
		帖子取底成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub

sub hf ''恢复

dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [del],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("del")=0
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)已经被管理员"&session("username")&"恢复到正常状态"
qingtian.addnfo(str)

%>
<!--#include file="abcdg.asp"-->
<%=title11%><%=we%>
		帖子恢复成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%


end sub


sub del ''删除


dim id,nid
dim listid,pageid,san,sann
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)

		dim rs,sql,i
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [del],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("del")=true
		rs.update
		end if
		Rs.close

		Sql = "select [Tid] FROM [qingtian_bbs]  where id="&listid&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
		rs("Tid")=rs("Tid")-1
		rs.update
		end if
		Rs.close



		Sql = "select [del] FROM [qingtian_bbs_reforum]  where topicid="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
		For i=1 to rs.RecordCount
			If Rs.Eof Then
				exit For
			End If
		rs("del")=true
		rs.update
		Rs.MoveNext
		Next
		end if
		Rs.close
                sann=qingtian.inlof("sann")
                san=qingtian.inlof("san")

		Sql = "select [zf],[money] FROM qingtian_user where [name]='"&qingtian.name(nid)&"'"
		Rs.Open Sql,conn,1,3
		if not (rs.eof and rs.bof) then
			rs("zf")=rs("zf")-sann
			rs("money")=rs("money")-san
			rs.update
		else
			nid=0
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"删除"
qingtian.addnfo(str)

%>
<!--#include file="abcdg.asp"-->
<%=title12%><%=we%>
		帖子删除成功<br/>楼主的积分减少<%=zi%><%=sann%><%=zi0%>,楼主的<%=qingtian.bi%>减小<%=zi%><%=san%><%=zi0%>,今日系统剩余<%=qingtian.bi%>:<%=zi%><%=qingtian.inlof("mot")%><%=zi0%>。<%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub

sub delrep ''删除回复


dim id,nid
dim listid,pageid,reid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		reid=Request.QueryString("reid")
		if not isnumeric(reid) then reid=0
		if reid="" then reid=0
		reid=clng(reid)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)


		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [del],[nid] FROM [qingtian_bbs_reforum]  where topicid="&id&" and  ID="&reid&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=qingtian.name(rs("nid"))
		rs("del")=true
		rs.update
		end if
		Rs.close
		Sql = "select [reply] FROM [qingtian_bbs_forum]  where  ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
		rs("reply")=rs("reply")-1
		rs.update
		end if
		Rs.close
                sann=qingtian.inlof("sann")
                san=qingtian.inlof("san")
		Sql = "select [zf],[money] FROM qingtian_user where [name]='"&qingtian.name(nid)&"'"
		Rs.Open Sql,conn,1,3
		if not (rs.eof and rs.bof) then
			rs("zf")=rs("zf")-sann
			rs("money")=rs("money")-san
			rs.update
		else
			nid=0
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你回复的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"删除"
qingtian.addnfo(str)

%>
<!--#include file="abcdg.asp"-->
<%=title12%><%=we%>
		帖子回复删除成功<br/>帖子删除成功<br/>楼主的积分减少<%=zi%><%=sann%><%=zi0%>,楼主的<%=qingtian.bi%>减小<%=zi%><%=san%><%=zi0%>,今日系统剩余<%=qingtian.bi%>:<%=zi%><%=qingtian.inlof("mot")%><%=zi0%>。<%=we0%><%=sou%>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%

end sub


sub tc ''提升

dim id,nid
dim listid,pageid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)


		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [reptime],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("reptime")=now()
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"提升"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title4%><%=we%>
		帖子提升成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%


end sub


sub move ''转移

dim id,nid
dim listid,pageid,bbsid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		bbsid=Request.form("bbsid")
		if not isnumeric(bbsid) then bbsid=0
		if bbsid="" then bbsid=0
		bbsid=clng(bbsid)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [listid],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("listid")=bbsid
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"转移到另一版面"
qingtian.addnfo(str)

		listid=bbsid
%>
<!--#include file="abcdg.asp"-->
<%=title13%><%=we%>
		帖子转移成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%


end sub
sub zuan ''加专

dim id
dim listid,bbsid
		


		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)

		bbsid=Request.form("bbsid")
		if not isnumeric(bbsid) then bbsid=0
		if bbsid="" then bbsid=0
		bbsid=clng(bbsid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=1
		if id="" then id=1
		id=clng(id)



		dim rs,sql
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select [zid],[zuan],[nid],[name] FROM [qingtian_bbs_forum]  where listid="&listid&" and ID="&id&""
		Rs.Open Sql,conn,1,3
		if not (rs.bof and rs.eof) then
                nid=rs("nid")
                name=rs("name")
		rs("zid")=bbsid
		rs("zuan")=true
		rs.update
		end if
		Rs.close
		Set rs = Nothing
str=""&nid&"tt你好,你发表的帖子(url=/bbs/viewv.asp?id="&id&"&pageid="&pageid&"&listid="&listid&"&sid=[sid])"&name&"(/url)被管理员"&session("username")&"加专"
qingtian.addnfo(str)
%>
<!--#include file="abcdg.asp"-->
<%=title13%><%=we%>
		帖子加为专题成功<br/>
		<a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><%=we0%><%=sou%>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		<%


end sub

%>
